package com.rabboit.config;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/31  20:47
 * 描述: 死信监听
 */
@RabbitListener(queues = {"TEST-QUEUE6"})
@Component
public class RabbitMessageListener6 {

    @RabbitHandler
    public void handler(Object msg, Message message, Channel channel){
        System.out.println("===死信==接收消息===="+new String(message.getBody()));
    }

}
